/**
 * file
 */
package com.tdkj.action.front.member.buyer;

import java.util.List;

import javax.annotation.Resource;

import com.opensymphony.xwork2.ActionContext;
import com.tdkj.action.BaseAction;
import com.tdkj.model.shop.BeanGoodFavorite;
import com.tdkj.model.user.BeanUser;
import com.tdkj.service.shop.IBeanGoodFavoriteService;
import com.tdkj.util.PublicConfing;

public class SupplyAndDemandAction extends BaseAction {

	private List<BeanGoodFavorite> favorites;
	
	private IBeanGoodFavoriteService goodFavoriteService;
	
	public String execute(){
		BeanUser user  = (BeanUser)ActionContext.getContext().getSession().get(PublicConfing.MEMBER_MEMBWE_OBJ_STRING_CONFIG);
		Long userId = user.getId();
		favorites = goodFavoriteService.getBeanGoodFavorites(userId);
		return "success";
	}

	/**
	 * @param goodFavoriteService the goodFavoriteService to set
	 */
	@Resource
	public void setGoodFavoriteService(IBeanGoodFavoriteService goodFavoriteService) {
		this.goodFavoriteService = goodFavoriteService;
	}

	/**
	 * @return the favorites
	 */
	public List<BeanGoodFavorite> getFavorites() {
		return favorites;
	}

	/**
	 * @param favorites the favorites to set
	 */
	public void setFavorites(List<BeanGoodFavorite> favorites) {
		this.favorites = favorites;
	}

	
	
}
